<!--
 * @Author: TuYongTao
 * @Date: 2021-10-28 10:18:53
 * @LastEditors: your Name
 * @LastEditTime: 2021-10-28 12:46:12
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="display" />
  <input type="file" id="fileElem" multiple accept="image/*" onchange="handleFiles(this.files)">
  <script>
    var div = document.getElementById('display');

    function handleFiles(files) {
      for (var i = 0; i < files.length; i++) {
        var img = document.createElement('img');
        img.src = window.URL.createObjectURL(files[i]);
        console.log(img.src);
        
        div.appendChild(img);
      }
    }
  </script>
</body>

</html>